#include "qresourceplugin.h"


#include "resourcewindow.h"

#include "../../include/qfindresult.h"

#include <qplugin.h>
#include <QVBoxLayout>


QResourceWidget::QResourceWidget(AbstractCore *core):
    m_core(core)
{
    m_widget=new ResourceWindow(m_core);
    m_text=tr("Resource");
    m_icon=QIcon(":/images/resource.png");
}

QString QResourceWidget::text()
{
    return m_text;
}

QIcon   QResourceWidget::icon()
{
    return m_icon;
}

int     QResourceWidget::index()
{
    return 1;
}

QWidget* QResourceWidget::widget()
{
    return m_widget;
}

bool QResourceWidget::enabled()
{
    return true;
}

QFindResult* QResourceWidget::search(const QString& text,bool sensitive,bool whole)
{
    QFindResult *result=new QFindResult;

    return result;
}


void QResourcePlugin::initPlugin(AbstractCore *core)
{
    QResourceWidget *wid;
    wid=new QResourceWidget(core);
    emit addObject(wid);
}

Q_EXPORT_PLUGIN2(QResourcePlugin, QResourcePlugin)
